Optimal. Leaf size=50 \[ \frac{a (2 A-B) \tan (c+d x)}{3 d}+\frac{(A+B) \sec ^3(c+d x) (a \sin (c+d x)+a)}{3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0678648, antiderivative size = 50, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.103, Rules used = {2855, 3767, 8} \[ \frac{a (2 A-B) \tan (c+d x)}{3 d}+\frac{(A+B) \sec ^3(c+d x) (a \sin (c+d x)+a)}{3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2855
Rule 3767
Rule 8
Rubi steps
\begin{align*} \int \sec ^4(c+d x) (a+a \sin (c+d x)) (A+B \sin (c+d x)) \, dx &=\frac{(A+B) \sec ^3(c+d x) (a+a \sin (c+d x))}{3 d}+\frac{1}{3} (a (2 A-B)) \int \sec ^2(c+d x) \, dx\\ &=\frac{(A+B) \sec ^3(c+d x) (a+a \sin (c+d x))}{3 d}-\frac{(a (2 A-B)) \operatorname{Subst}(\int 1 \, dx,x,-\tan (c+d x))}{3 d}\\ &=\frac{(A+B) \sec ^3(c+d x) (a+a \sin (c+d x))}{3 d}+\frac{a (2 A-B) \tan (c+d x)}{3 d}\\ \end{align*}
Mathematica [A] time = 0.587961, size = 97, normalized size = 1.94 \[ \frac{a \sec (c) (\sin (c+d x)+1) \sec ^3(c+d x) (-2 (A+B) \cos (c+d x)+A \sin (2 (c+d x))+4 A \cos (c+2 d x)+8 A \sin (d x)+B \sin (2 (c+d x))-2 B \cos (c+2 d x)+6 B \cos (c)-4 B \sin (d x))}{12 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.084, size = 72, normalized size = 1.4 \begin{align*}{\frac{1}{d} \left ({\frac{aA}{3\, \left ( \cos \left ( dx+c \right ) \right ) ^{3}}}+{\frac{aB \left ( \sin \left ( dx+c \right ) \right ) ^{3}}{3\, \left ( \cos \left ( dx+c \right ) \right ) ^{3}}}-aA \left ( -{\frac{2}{3}}-{\frac{ \left ( \sec \left ( dx+c \right ) \right ) ^{2}}{3}} \right ) \tan \left ( dx+c \right ) +{\frac{aB}{3\, \left ( \cos \left ( dx+c \right ) \right ) ^{3}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.02611, size = 80, normalized size = 1.6 \begin{align*} \frac{B a \tan \left (d x + c\right )^{3} +{\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} A a + \frac{A a}{\cos \left (d x + c\right )^{3}} + \frac{B a}{\cos \left (d x + c\right )^{3}}}{3 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.62345, size = 166, normalized size = 3.32 \begin{align*} -\frac{{\left (2 \, A - B\right )} a \cos \left (d x + c\right )^{2} +{\left (2 \, A - B\right )} a \sin \left (d x + c\right ) -{\left (A - 2 \, B\right )} a}{3 \,{\left (d \cos \left (d x + c\right ) \sin \left (d x + c\right ) - d \cos \left (d x + c\right )\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.32178, size = 127, normalized size = 2.54 \begin{align*} -\frac{\frac{3 \,{\left (A a - B a\right )}}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1} + \frac{9 \, A a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} + 3 \, B a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 12 \, A a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 7 \, A a + B a}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1\right )}^{3}}}{6 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]